﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.AspNet.SignalR;

namespace Bordspil.Hubs
{
    public class ChatHub : Hub
    {
        public void join(string groupName)
        {
            Groups.Add(Context.ConnectionId, groupName);
        }

        public void SendMessage(string groupName, string message)
        {
            //Ef ég vil senda á sérstakan aðila geri ég 
            //Clients[Context.ConnectionId].....
            Clients.OthersInGroup(groupName).writeMessage(message);
        }
    }
}